local md__tuidi = fk.CreateSkill{
    name = "md__tuidi",
  }
  
  Fk:loadTranslationTable{
    ["md__tuidi"] = "退敌",
    [":md__tuidi"] = "当你对其他角色造成伤害后，你可以废除其装备区的一个装备栏。",
    ["#md__tuidi-invoke"] = "退敌：你可以废除 %dest 一个装备栏",
    ["$md__tuidi"] = "兴兵伐楚，稳大秦基业！",
  }
  
  md__tuidi:addEffect(fk.Damage, {
    -- anim_type = "offensive",
    can_trigger = function(self, event, target, player, data)
      return player:hasSkill(md__tuidi.name) and data.from == player and 
      data.to ~= player and #data.to:getAvailableEquipSlots() > 0
    end,
    on_cost = function (self, event, target, player, data)
      local room = player.room
      local targetPlayer = data.to
      local choices = targetPlayer:getAvailableEquipSlots()
      table.insert(choices, "Cancel")
      local choice = room:askToChoice(player, {
        choices = choices,
        skill_name = md__tuidi.name,
        prompt = "#md__tuidi-invoke::"..targetPlayer.id,
      })
      if choice ~= "Cancel" then
        event:setCostData(self, {tos = {targetPlayer}, choice = choice})
        return true
      end
    end,
    on_use = function(self, event, target, player, data)
    --   player.room:abortPlayerArea(target, {table.random(target:getAvailableEquipSlots())}) 
      local room = player.room
      room:abortPlayerArea(event:getCostData(self).tos[1], event:getCostData(self).choice)
    end,
  })
  
  return md__tuidi
  